import request from '@/utils/request'

export function login(data) {
  return request({
    url: '/vue-element-admin/user/login',
    method: 'post',
    data
  })
}

export function getInfo() {
  return request({
    url: 'http://1.92.204.101:5000/auth/get_myself',
    method: 'get',
    headers: {
      'Authorization': 'Bearer ' + sessionStorage.getItem('token')
    }
  })
}

export function logout() {
  return request({
    url: '/vue-element-admin/user/logout',
    method: 'post'
  })
}
